//hide advanced search
switchMenu('searchPanelMeeting'); 
//apply datatable plugin to meetingsTable
var tableMeetings  = $('#meetingsTable').dataTable({
    <%if (request.getSession().getAttribute("org.apache.struts.action.LOCALE").toString().equals("sr")) {%>
                            "oLanguage": {
                                "sUrl": path2SrLocaleTables
                            },
    <%}%>
                            'bJQueryUI': true
                            ,'sPaginationType': 'full_numbers'

                            ,"aoColumns": [
                                { "sType": "string" },
                                { "sType": "string" },
                                { "sType": "string" },
                                { "sType": "uk_date" },
                                { "sType": "string" },
                                { "sType": "string" },
                                { "sType": "string" },
                                { "sType": "string" },
                                { "sType": "string" }
                            ]
                        });

                       

                    $("#meetingsTable tfoot input").keyup( function () {
                        /* Filter on the column (the index) of this element */
                        tableMeetings.fnFilter( this.value, $("tfoot input").index(this) );
                    } );


                    $('#dateFrom').keyup( function() {
                        var val = $('#dateFrom').val();
                        len = val.length;
                        if (len == 10 || len==0) {
                            tableMeetings.fnDraw();
                        }
                    } );

                    $('#dateTo').keyup( function() {
                        var val = $('#dateTo').val();
                        len = val.length;
                        if (len == 10 || len==0) {
                            tableMeetings.fnDraw();
                        }
                    } );
					
			//mak tabs to view meeting		
					$("#meetingTabs").tabs({
			cookie: {
				// store cookie for a day, without, it would be a session cookie
				expires: 1
			}
		});

		//render tab in  dialog
			$('#meetingDialog').bind('dialogopen', function() {
      $("#meetingTabs").tabs();
	     var searchReprTable = $('#searchRepTable').dataTable({
		<%if(!request.getSession().getAttribute("org.apache.struts.action.LOCALE").toString().equals("en")){%>
 				"oLanguage": {
			"sUrl": path2SrLocaleTables
			
		},
		<%}%>
		"aLengthMenu": [[5,10, 25, 50, -1], [5,10, 25, 50, "All"]],
		'bJQueryUI': true,
		'sPaginationType': 'full_numbers',
		'aoColumnDefs': [{ 'bSortable': false,  'aTargets': [ 'do-not-sort' ] }]
		});

	  
	  
     });
	
    $("#meetingDialog").bind('dialogclose', function() {
        /* destroy tabs to avoid problems on re-open */
        $("#meetingTabs").tabs('destroy');
        
    }); 
	
		  
		  
		  
		
		